/**
 * 
 */
package cn.edu.cqu.bysj.wm.keynode;

import java.util.List;

import org.neo4j.graphdb.Node;
import cn.edu.cqu.bysj.wm.ago.lp.LP;


/**
 * @author Meng
 * 
 */
class SkylineRunnable implements Runnable {
	LP lp;
	CentralityTool cTool;
	Skyline skyline = new Skyline();
	long cid;
	double clusterLimit;

	/**
	 * @param cTool
	 */
	public SkylineRunnable(LP lp, long cid, List<Node> list,int[] flag) {
		super();
		this.lp = lp;
		this.cid = cid;
		this.cTool = new CentralityTool(lp, flag,list);
		this.clusterLimit = 0;
	}

	@Override
	public void run() {
		cTool.ssspDijsktra();
		cTool.getDiameter();
		cTool.degreeCentrality();
		cTool.betweennessCentrality();
		cTool.stressCentrality();
		cTool.clossnessCentrality();
		cTool.clusterCoefficient(clusterLimit);
		cTool.pagerank(lp.matrix);
		skyline.search(cTool);
		KeyNodes.sLocalKeyNodes.put(cid, skyline.keyNodes);
	}

}